<template>
  <div>
    <div class="top">
      <HomeHeader>
        <span class="iconfont icon-caidan"></span>
      </HomeHeader>
      <HomeLogo />
      <HomeNav />
    </div>

    <div class="list">
      <!-- <HomeList /> -->
      <!-- <keep-alive>
        <router-view v-if="$route.meta.requireAlive" />
      </keep-alive>
      <router-view v-if="!$route.meta.requireAlive" /> -->
      <transition name="fade">
        <router-view />
      </transition>
    </div>
  </div>
</template>

<script>
import HomeHeader from "./components/HomeHeader.vue";
import HomeLogo from "./components/HomeLogo";
import HomeNav from "./components/HomeNav";
// import HomeList from "./components/HomeList";
export default {
  components: {
    HomeHeader,
    HomeLogo,
    HomeNav,
    // HomeList,
  },
  // watch: {
  //   $route(to) {
  //     console.log(to);
  //   },
  // },
};
</script>

<style lang="less" scoped>
.top {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9;
}

.list {
  position: fixed;
  top: 154px;
  bottom: 50px;
  left: 0;
  right: 0;
}

.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.5s;
}
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
  opacity: 0;
}
</style>
